<?php
/**
 * xushuhui
 * 2017/8/9
 * 16:52
 */

namespace app\index\service;
use think\Loader;
Loader::import('AliyunSms.SendSms', EXTEND_PATH);
/**
 * 短信接口类
 * Class Sms
 * @package app\index\service
 * @author xushuhui
 * @version 1.0
 */
class Sms
{
	public static function send($mobile)
	{
		$config = config('sms');
		$code = getRandCode(1,4);
		session('regCode',$code);
		$res = \SendSms::instance($config)->send($mobile,$code,$config['template'],$config['signName'],$config['product']);
		return $res;
	}
}